package com.team3.ecommerce.controller;


import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.stereotype.Component;



//使用明文密码encoder，方便数据库直接添加用户及调试
@Component
public class CustomPasswordEncoder implements PasswordEncoder {

    @Override
    public String encode(CharSequence charSequence) {
        return charSequence.toString();
    }

    @Override
    public boolean matches(CharSequence charSequence, String s) {
        return s.equals(charSequence.toString());
    }
}
